package filedemo;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {


        File file = new File("./demo.txt");
        String name = file.getName();
        long length = file.length();
        System.out.println(name);
        System.out.println(length);
        System.out.println(file.canRead());
        System.out.println(file.canWrite());
    }
}